package com.day05;

/**
 * 数组逆序
 */
public class ArrayOrderDesc {



    public static int[] person(int[] a) {
        int[] b = new int[a.length];
        int j = 0;
        for(int i = a.length-1; i >= 0; i--) {
            System.out.println("i=" + i);
            b[j] = a[i];
            j++;
        }
        return b;
    }

    public static void main(String[] args) {
        int[] a = {1,2,3};
        int[] person = person(a);
        for (int i : person) {
            System.out.println(i);
        }
    }
}
